/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
"""Just testing the JointGroupControlClient Python wrapper"""

import JointGroupCtrlClient as JC 
import sys
sys.path.append("../../../GIMI")
import gimi
g= gimi.GIMI()
jgcc = JC.CJointGroupCtrlClient(g, 0)
r = g.connectToHubEx("asrobo.hut.fi", 40002, "jgccTest")

r = jgcc.SetDefaultTarget("Sony")
r = jgcc.Open()
f = 0.0
r = jgcc.GetPosition(0, f, 1000)
if r[0]:
	print "joint 0 at %f"%r[1]
else:
	print "joint reading failed"
g.stop()



